<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <script src="../avalon1.4/avalon.js" ></script>
    <script>
        var model = avalon.define({
            $id: "test",
            aaa: "2",
            bbb: "2",
            $ccc: "1",
            ddd: "1",
            $skipArray: ["ddd"],
            click: function(a) {
                var old = model[a]
                model.$fire(a, new Date - 0, old)//这样ddd和$ccc都可以触发属性变化
            }
        })
        model.$watch("$all", function(name, a, b) {
            console.log(name, a, b)
        })

    </script>
    <style>
        .ms-hover div:hover{
            background:yellowgreen;
        }
    </style>
</head>
<body ms-controller="test" class='ms-hover'>
<div ms-click="click('aaa')">{{aaa}}</div>
<div ms-click="click('bbb')">{{bbb}}</div>
<div ms-click="click('$ccc')">{{$ccc}}</div>
<div ms-click="click('ddd')">{{ddd}}</div>
</body>
</html>